package com.example.config;

import com.example.service.OrderService;
import com.example.service.impl.OrderServiceImpl;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

// 类名是 AppConfig，文件必须叫 AppConfig.java
@Configuration
@ComponentScan("com.example")
@EnableAspectJAutoProxy
public class AppConfig {

    @Bean
    public OrderService orderService() {
        return new OrderServiceImpl();
    }
}